import { defHttp } from '/@/utils/http/axios';

enum Api {
  shadowGet = '/uav/device/shadow/get/',
  drcControl = '/uav/device/debug/instruct/drcControl',
  modeEnter = '/uav/device/debug/instruct/modeEnter',
  instructPost = '/uav/device/debug/instruct/post',
  instructTakeoff = '/uav/device/debug/instruct/takeoff',
  startLive = '/uav/device/live/start',  // 开始直播
  stopLive = '/uav/device/live/stop',  // 结束直播
  list = '/uav/device/live/list',  // 查询直播设备列表
  setLen = '/uav/device/live/lensChange', //设置直播镜头
  modeExit = '/uav/device/debug/instruct/modeExit'
}

export const shadowGet = (params) => defHttp.get({ url: Api.shadowGet + params }, { errorMessageMode: 'none' });
export const drcControl = (params) => defHttp.post({ url: Api.drcControl, params }, { successMessageMode: 'none' });
export const modeEnter = (params) => defHttp.post({ url: Api.modeEnter, params });
export const instructPost = (params) => defHttp.post({ url: Api.instructPost, params }, { successMessageMode: 'none' })

export const instructTakeoff = (params) => defHttp.post({ url: Api.instructTakeoff, params });
export const startLive = (params) => defHttp.post({ url: Api.startLive, params });
export const stopLive = (params) => defHttp.post({ url: Api.stopLive, params });
export const list = (params) => defHttp.get({ url: Api.list, params });
export const setLen = (params) => defHttp.post({ url: Api.setLen, params });
export const modeExit = (params) => defHttp.post({ url: Api.modeExit, params });
